package model.core;

import java.util.ArrayList;
import java.util.StringTokenizer;

public class LineParser {

	public ArrayList<String> parseStringOnSemicolon(String toParse){
		ArrayList<String> toReturn = new ArrayList<String>();
		StringTokenizer tokens = new StringTokenizer(toParse, ";");
		while (tokens.hasMoreTokens()){
			toReturn.add(tokens.nextToken());
		}
		return toReturn;
	}
	public ArrayList<String> parseStringOnCommaAndRemoveParen(String toParse){
		toParse = toParse.substring(1, toParse.length() - 1);
		ArrayList<String> toReturn = new ArrayList<String>();
		StringTokenizer tokens = new StringTokenizer(toParse, ",");
		while (tokens.hasMoreTokens()){
			toReturn.add(tokens.nextToken());
		}
		return toReturn;
	}
}
